package com.ruoyi.yanjing.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yanjing.mapper.SpecialWorkTicketApprovalMapper;
import com.ruoyi.yanjing.domain.SpecialWorkTicketApproval;
import com.ruoyi.yanjing.service.ISpecialWorkTicketApprovalService;

/**
 * 特种作业票审批信息Service业务层处理
 * 
 * @author whz
 * @date 2024-12-04
 */
@Service
public class SpecialWorkTicketApprovalServiceImpl implements ISpecialWorkTicketApprovalService 
{
    @Autowired
    private SpecialWorkTicketApprovalMapper specialWorkTicketApprovalMapper;

    /**
     * 查询特种作业票审批信息
     * 
     * @param id 特种作业票审批信息主键
     * @return 特种作业票审批信息
     */
    @Override
    public SpecialWorkTicketApproval selectSpecialWorkTicketApprovalById(Long id)
    {
        return specialWorkTicketApprovalMapper.selectSpecialWorkTicketApprovalById(id);
    }

    /**
     * 查询特种作业票审批信息列表
     * 
     * @param specialWorkTicketApproval 特种作业票审批信息
     * @return 特种作业票审批信息
     */
    @Override
    public List<SpecialWorkTicketApproval> selectSpecialWorkTicketApprovalList(SpecialWorkTicketApproval specialWorkTicketApproval)
    {
        return specialWorkTicketApprovalMapper.selectSpecialWorkTicketApprovalList(specialWorkTicketApproval);
    }

    /**
     * 新增特种作业票审批信息
     * 
     * @param specialWorkTicketApproval 特种作业票审批信息
     * @return 结果
     */
    @Override
    public int insertSpecialWorkTicketApproval(SpecialWorkTicketApproval specialWorkTicketApproval)
    {
        specialWorkTicketApproval.setCreateTime(DateUtils.getNowDate());
        return specialWorkTicketApprovalMapper.insertSpecialWorkTicketApproval(specialWorkTicketApproval);
    }

    /**
     * 修改特种作业票审批信息
     * 
     * @param specialWorkTicketApproval 特种作业票审批信息
     * @return 结果
     */
    @Override
    public int updateSpecialWorkTicketApproval(SpecialWorkTicketApproval specialWorkTicketApproval)
    {
        specialWorkTicketApproval.setUpdateTime(DateUtils.getNowDate());
        return specialWorkTicketApprovalMapper.updateSpecialWorkTicketApproval(specialWorkTicketApproval);
    }

    /**
     * 批量删除特种作业票审批信息
     * 
     * @param ids 需要删除的特种作业票审批信息主键
     * @return 结果
     */
    @Override
    public int deleteSpecialWorkTicketApprovalByIds(Long[] ids)
    {
        return specialWorkTicketApprovalMapper.deleteSpecialWorkTicketApprovalByIds(ids);
    }

    /**
     * 删除特种作业票审批信息信息
     * 
     * @param id 特种作业票审批信息主键
     * @return 结果
     */
    @Override
    public int deleteSpecialWorkTicketApprovalById(Long id)
    {
        return specialWorkTicketApprovalMapper.deleteSpecialWorkTicketApprovalById(id);
    }
}
